{% from "_login.html" import render_field %}
<!-- 登录表单 -->
<form method="POST">

  {{ form.csrf_token }}
  {{ render_field(form.username) }}
  {{ render_field(form.password) }}
  {% if emsg %}  <!-- 如果有错误信息 则显示 -->
      <h3> {{ emsg }}</h3>
  {% endif %}
  <input type="submit" value="登录">
</form>